package top.huhuiyu.springboot2.study.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * @author 胡辉煜
 */
@Getter
@Setter
public class AppException extends RuntimeException {
  private int code;

  public AppException(String message) {
    super(message);
  }

  public static AppException getInstance(String message) {
    AppException ex = new AppException(message);
    ex.setCode(500);
    return ex;
  }

}
